<html lang="en">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" type="text/css"
          href="/public/static/h-ui/css/style.css?v=1.3">
    <link media="all" href="/public/menu/css/article.css" type="text/css"
          rel="stylesheet">
    <style>
        td a:hover {
            background-color: rgb(13, 163, 249);
            color: #fff;
            border: 1px solid rgb(13, 163, 249);
        }
    </style>
    <link rel="stylesheet" href="/public/static/layer/2.4/skin/layer.css"
          id="layui_layer_skinlayercss" style="">
</head>
<body style="background-color: rgb(255, 255, 255);">
<div class="jbox-container" style="float: left; padding: 0px;">
    <ul class="gagp-goodslist" style="padding: 10px; width: 580px;">
        <!-- 栏目分类 -->
        <table class="wxtables">
            <colgroup>
                <col width="10%">
                <col width="25%">
                <col width="15%">
            </colgroup>
            <thead>
            <tr style="background-color: rgb(13, 163, 249);">
                <td>ID</td>
                <td>名称</td>
                <td style="text-align: center;">操作</td>
            </tr>
            </thead>
            {volist name="list" id="vo"}
            <tr>
                <td><p>{$vo.uniacid }</p></td>
                <td><p>{$vo.name}</p></td>
                <td><a style="border-radius: 2px;" class="btn selecta" data-uniacid="{$vo.uniacid}" data-key="{$vo.key}"
                       data-secret="{$vo.secret}" data-name="{$vo.name}">选择</a></td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="n_page_no">
            {$list->render()}
        </div>
        <input type="hidden" id="this_id" value="0">
    </ul>
</div>
<div style="height:80px; line-height: 80px;color:#fff; clear: both;">壹佰小程序占位</div>
<div class="sel_fun_opt"
     style="position: fixed; bottom: 0px;background: #fff;height: 60px;width:100%;border-top:1px solid #eeeeee;padding-top:20px">
    <div class="sure" onclick="" style="margin-left: 165px;">确定</div>
    <div class="cancel" onclick="">返回</div>
</div>
<script type="text/javascript" src="/public/js/jquery-2.1.1.js"></script>
<script type="text/javascript" src="/public/static/layer/2.4/layer.js"></script>
<script type="text/javascript">
    $(".selecta").click(function () {
        if ($(this).hasClass('selectedb')) {
        } else {
            $(this).addClass('selectedb');
            $(this).html('已选择');
            $(this).parent().parent().siblings().find('.selecta').removeClass('selectedb');
            $(this).parent().parent().siblings().find('.selecta').html('选择');
        }
    });
    $(".sure").click(function () {
        if (typeof($('.selectedb').attr('data-name')) == "undefined") {
            layer.msg('请选择内容', {icon: 5, time: 1000});
            return false;
        }
        var item = {};
        item["uniacid"] = $('.selectedb').attr('data-uniacid');
        item['name'] = $('.selectedb').attr('data-name');
        item['key'] = $('.selectedb').attr('data-key');
        item['secret'] = $('.selectedb').attr('data-secret');
        parent.get_wechats(item);
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    })
    $(".cancel").click(function () {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    });
</script>
</body>
</html>